package com.ywl.designpattern.uml.aggregation;

/**
 * 聚合关系(Aggregation)
 * 特殊的关联关系，整体与部分可以分开
 * 用实线空心菱形箭头表示
 */
public class Computer {
    private Mouse mouse; //鼠标可以和computer分离
    private Moniter moniter;//显示器可以和Computer分离
    public void setMouse(Mouse mouse) {
        this.mouse = mouse;
    }
    public void setMoniter(Moniter moniter) {
        this.moniter = moniter;
    }
}

class Moniter {

}
class Mouse {

}